home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / tchk21.arc / INCLUDE.ARC / ZIP.H < prev   
C/C++ Source or Header  |  1989-06-20  |  2KB  |  64 lines

  1. /* TCHK 2.1 - Howard Kapustein's Turbo C library        6-6-89      */
  2. /* Copyright (C) 1988,1989 Howard Kapustein.  All rights reserved.  */
  3.  
  4. /* zip.h  -  ZIP functions header file */
  5.  
  6. #ifndef ZIP_HEADER
  7. #define ZIP_HEADER    1
  8.  
  9. typedef struct ZIP_local_header {
  10.             long Signature;
  11.             int version;
  12.             int BitFlag;
  13.             int CompressionMethod;
  14.             unsigned int FileTime;
  15.             unsigned int FileDate;
  16.             long CRC32;
  17.             long CompressedSize;
  18.             long UnCompressedSize;
  19.             int FileNameLength;
  20.             int ExtraFieldLength;
  21.         };
  22.  
  23. typedef struct ZIP_central_record {
  24.             long Signature;
  25.             int VersionMadeBy;
  26.             int VersionNeeded;
  27.             int BitFlag;
  28.             int CompressionMethod;
  29.             unsigned int FileTime;
  30.             unsigned int FileDate;
  31.             long CRC32;
  32.             long CompressedSize;
  33.             long UnCompressedSize;
  34.             int FileNameLength;
  35.             int CommentFieldLength;
  36.             int DiskStartNumber;
  37.             int InternalAttributes;
  38.             long ExternalAttributes;
  39.             long LocalHeaderOffset;
  40.         };
  41.  
  42. typedef struct ZIP_end_central_record {
  43.             long Signature;
  44.             int ThisDiskNumber;
  45.             int CentralDiskNumber;
  46.             int EntriesCentral;
  47.             long SizeCentral;
  48.             long OffsetCentral;
  49.             int ZipfileCommentLength;
  50.         };
  51.  
  52. #define MAX_ZIP_VERSION         10
  53. #define ZIPSignatureLocal       0x04034B50l
  54. #define ZIPSignatureCentral     0x02014B50l
  55. #define ZIPSignatureEndCentral  0x06054B50l
  56. #define nextZIPlocal(Z)         (Z.FileNameLength + Z.ExtraFieldLength + Z.CompressedSize)
  57. #define ZIPversion(Zversion)    (Zversion & 0x00FF)
  58. #define _ZIPmajor(Zversion)     (ZIPversion(Zversion) / 10)
  59. #define _ZIPminor(Zversion)     (ZIPversion(Zversion) % 10)
  60.  
  61. /* function prototypes */
  62.  
  63. #endif              /* ZIP_HEADER */
  64.